<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>树洞推荐 - 心声社交</title>
    <!-- Bootstrap 5 CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Font Awesome -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    
    <style>
        :root {
            --primary: #5B7BDF;
            --primary-light: #E8EEFF;
            --secondary: #FF7D73;
            --dark: #2C3344;
            --gray: #8A94A6;
            --light-gray: #F2F5F9;
            --border: #E1E5EB;
            --shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
            --radius: 8px;
            --transition: all 0.3s ease;
        }
        
        body {
            font-family: 'Inter', system-ui, -apple-system, sans-serif;
            color: var(--dark);
            background-color: #F9FAFC;
            line-height: 1.6;
            padding-top: 2rem;
            padding-bottom: 5rem;
        }
        
        .container {
            max-width: 1200px;
        }
        
        .page-header {
            margin-bottom: 2rem;
            text-align: center;
        }
        
        .page-title {
            font-size: 2rem;
            font-weight: 700;
            color: var(--dark);
            margin-bottom: 0.5rem;
        }
        
        .page-description {
            color: var(--gray);
            max-width: 600px;
            margin: 0 auto;
        }
        
        .view-tabs {
            display: flex;
            justify-content: center;
            gap: 1rem;
            margin-bottom: 2.5rem;
            flex-wrap: wrap;
        }
        
        .view-tab {
            padding: 0.5rem 1.25rem;
            border-radius: 20px;
            background-color: white;
            border: 1px solid var(--border);
            color: var(--dark);
            font-weight: 500;
            cursor: pointer;
            transition: var(--transition);
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        
        .view-tab.active {
            background-color: var(--primary);
            color: white;
            border-color: var(--primary);
        }
        
        .view-tab:hover:not(.active) {
            border-color: var(--primary);
            color: var(--primary);
        }
        
        .section-title {
            font-size: 1.5rem;
            font-weight: 600;
            margin-bottom: 1.5rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        
        .section-title i {
            color: var(--primary);
        }
        
        .card {
            border: 1px solid var(--border);
            border-radius: var(--radius);
            overflow: hidden;
            background-color: white;
            transition: var(--transition);
            margin-bottom: 1.5rem;
        }
        
        .card:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 15px rgba(0, 0, 0, 0.08);
        }
        
        .树洞-content {
            padding: 1.25rem;
        }
        
        .树洞-header {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            margin-bottom: 1rem;
        }
        
        .user-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            object-fit: cover;
        }
        
        .user-info {
            flex: 1;
        }
        
        .user-name {
            font-weight: 600;
            font-size: 0.95rem;
        }
        
        .post-time {
            font-size: 0.8rem;
            color: var(--gray);
        }
        
        .树洞-text {
            margin-bottom: 1rem;
            line-height: 1.7;
        }
        
        .树洞-text p {
            margin-bottom: 0;
        }
        
        .image-container {
            margin-bottom: 1rem;
            border-radius: 6px;
            overflow: hidden;
        }
        
        .single-image {
            width: 100%;
            height: 250px;
            object-fit: cover;
        }
        
        .multi-image {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 4px;
        }
        
        .multi-image img {
            width: 100%;
            height: 120px;
            object-fit: cover;
        }
        
        .multi-image img:nth-child(1) {
            grid-column: 1 / 2;
            grid-row: 1 / 2;
        }
        
        .multi-image img:nth-child(2) {
            grid-column: 2 / 3;
            grid-row: 1 / 2;
        }
        
        .multi-image img:nth-child(3) {
            grid-column: 1 / 2;
            grid-row: 2 / 3;
        }
        
        .multi-image img:nth-child(4) {
            grid-column: 2 / 3;
            grid-row: 2 / 3;
        }
        
        .树洞-actions {
            display: flex;
            justify-content: space-around;
            padding: 0.75rem 0 0;
            border-top: 1px solid var(--border);
        }
        
        .action-btn {
            display: flex;
            align-items: center;
            gap: 0.35rem;
            color: var(--gray);
            background: none;
            border: none;
            padding: 0.35rem 0.75rem;
            border-radius: 4px;
            cursor: pointer;
            transition: var(--transition);
            font-size: 0.9rem;
        }
        
        .action-btn:hover {
            background-color: var(--light-gray);
            color: var(--primary);
        }
        
        .action-btn.liked {
            color: var(--secondary);
        }
        
        .action-btn.saved {
            color: var(--primary);
        }
        
        /* 布局样式 */
        .grid-layout {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 1.5rem;
            margin-bottom: 3rem;
        }
        
        .list-layout {
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
            margin-bottom: 3rem;
        }
        
        .list-layout .card {
            display: flex;
            flex-direction: row;
        }
        
        .list-layout .image-container {
            width: 200px;
            margin-bottom: 0;
            margin-right: 1.25rem;
            flex-shrink: 0;
        }
        
        .list-layout .single-image {
            height: 100%;
        }
        
        .list-layout .multi-image {
            height: 100%;
        }
        
        .list-layout .multi-image img {
            height: 100%;
        }
        
        .featured-layout {
            margin-bottom: 3rem;
        }
        
        .featured-树洞 {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 0;
            height: 400px;
        }
        
        .featured-树洞 .树洞-content {
            display: flex;
            flex-direction: column;
            justify-content: center;
            padding: 2rem;
        }
        
        .featured-树洞 .树洞-text {
            font-size: 1.15rem;
            margin-bottom: 1.5rem;
        }
        
        .featured-树洞 .image-container {
            margin-bottom: 0;
            height: 100%;
        }
        
        .featured-树洞 .single-image {
            height: 100%;
        }
        
        .stats-bar {
            display: flex;
            gap: 1.5rem;
            margin-top: 1rem;
            font-size: 0.9rem;
            color: var(--gray);
        }
        
        .stat-item {
            display: flex;
            align-items: center;
            gap: 0.35rem;
        }
        
        /* 无图树洞样式 */
        .no-image-树洞 {
            border-left: 3px solid var(--primary);
        }
        
        /* 响应式设计 */
        @media (max-width: 992px) {
            .featured-树洞 {
                grid-template-columns: 1fr;
                height: auto;
            }
            
            .list-layout .card {
                flex-direction: column;
            }
            
            .list-layout .image-container {
                width: 100%;
                margin-right: 0;
                margin-bottom: 1.25rem;
            }
            
            .list-layout .single-image {
                height: 200px;
            }
        }
        
        @media (max-width: 768px) {
            .page-title {
                font-size: 1.75rem;
            }
            
            .grid-layout {
                grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
            }
            
            .featured-树洞 .树洞-content {
                padding: 1.5rem;
            }
        }
        
        @media (max-width: 576px) {
            .view-tabs {
                gap: 0.5rem;
            }
            
            .view-tab {
                padding: 0.4rem 0.8rem;
                font-size: 0.9rem;
            }
            
            .section-title {
                font-size: 1.3rem;
            }
            
            .树洞-actions {
                justify-content: space-between;
            }
            
            .action-btn span {
                display: none;
            }
            
            .action-btn {
                gap: 0;
                padding: 0.35rem;
            }
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="page-header">
            <h1 class="page-title">树洞推荐</h1>
            <p class="page-description">发现身边的心声，分享生活的点滴，在这里，你可以畅所欲言</p>
        </div>
        
        <!-- 视图切换 -->
        <div class="view-tabs">
            <div class="view-tab active" data-view="all">
                <i class="fas fa-th"></i> 全部推荐
            </div>
            <div class="view-tab" data-view="featured">
                <i class="fas fa-star"></i> 精选树洞
            </div>
            <div class="view-tab" data-view="latest">
                <i class="fas fa-clock"></i> 最新发布
            </div>
            <div class="view-tab" data-view="popular">
                <i class="fas fa-fire"></i> 热门讨论
            </div>
        </div>
        
        <!-- 精选树洞区域 -->
        <div class="featured-layout">
            <h2 class="section-title">
                <i class="fas fa-star"></i> 精选树洞
            </h2>
            
            <div class="card featured-树洞">
                <div class="树洞-content">
                    <div class="树洞-header">
                        <img src="https://picsum.photos/seed/user10/100/100" alt="用户头像" class="user-avatar">
                        <div class="user-info">
                            <div class="user-name">城南旧事</div>
                            <div class="post-time">3小时前</div>
                        </div>
                    </div>
                    
                    <div class="树洞-text">
                        <p>今天终于鼓起勇气辞职了，虽然不知道未来会怎样，但我知道这是正确的选择。工作三年，感觉自己像个机器一样运转，失去了热情和创造力。</p>
                        <p>接下来想给自己放个长假，去西藏看看，然后重新思考自己真正想做的事情。也许会很难，但总比一辈子活在遗憾里好。</p>
                    </div>
                    
                    <div class="stats-bar">
                        <div class="stat-item">
                            <i class="far fa-eye"></i> 2.5k
                        </div>
                        <div class="stat-item">
                            <i class="far fa-comment"></i> 132
                        </div>
                        <div class="stat-item">
                            <i class="far fa-heart"></i> 568
                        </div>
                    </div>
                    
                    <div class="树洞-actions">
                        <button class="action-btn">
                            <i class="far fa-heart"></i>
                            <span>点赞</span>
                        </button>
                        <button class="action-btn">
                            <i class="far fa-comment"></i>
                            <span>评论</span>
                        </button>
                        <button class="action-btn">
                            <i class="far fa-bookmark"></i>
                            <span>收藏</span>
                        </button>
                        <button class="action-btn">
                            <i class="far fa-share-alt"></i>
                            <span>分享</span>
                        </button>
                    </div>
                </div>
                
                <div class="image-container">
                    <img src="https://picsum.photos/seed/featured/800/600" alt="辞职后的风景" class="single-image">
                </div>
            </div>
        </div>
        
        <!-- 网格布局树洞 -->
        <div class="grid-layout">
            <h2 class="section-title col-12">
                <i class="fas fa-th-large"></i> 发现更多
            </h2>
            
            <!-- 单图树洞 -->
            <div class="card">
                <div class="树洞-content">
                    <div class="树洞-header">
                        <img src="https://picsum.photos/seed/user1/100/100" alt="用户头像" class="user-avatar">
                        <div class="user-info">
                            <div class="user-name">夏日晚风</div>
                            <div class="post-time">昨天 19:42</div>
                        </div>
                    </div>
                    
                    <div class="树洞-text">
                        <p>傍晚在湖边散步时拍的，夕阳真美啊，感觉所有的烦恼都被治愈了。</p>
                    </div>
                    
                    <div class="image-container">
                        <img src="https://picsum.photos/seed/post1/600/400" alt="湖边夕阳" class="single-image">
                    </div>
                    
                    <div class="树洞-actions">
                        <button class="action-btn liked">
                            <i class="fas fa-heart"></i>
                            <span>245</span>
                        </button>
                        <button class="action-btn">
                            <i class="far fa-comment"></i>
                            <span>32</span>
                        </button>
                        <button class="action-btn">
                            <i class="far fa-bookmark"></i>
                            <span>收藏</span>
                        </button>
                        <button class="action-btn">
                            <i class="far fa-share-alt"></i>
                            <span>分享</span>
                        </button>
                    </div>
                </div>
            </div>
            
            <!-- 多图树洞 -->
            <div class="card">
                <div class="树洞-content">
                    <div class="树洞-header">
                        <img src="https://picsum.photos/seed/user2/100/100" alt="用户头像" class="user-avatar">
                        <div class="user-info">
                            <div class="user-name">美食爱好者</div>
                            <div class="post-time">2天前</div>
                        </div>
                    </div>
                    
                    <div class="树洞-text">
                        <p>周末在家尝试做了几道新菜，虽然过程有点手忙脚乱，但结果还不错，味道很赞！</p>
                    </div>
                    
                    <div class="image-container">
                        <div class="multi-image">
                            <img src="https://picsum.photos/seed/food1/300/300" alt="菜品1">
                            <img src="https://picsum.photos/seed/food2/300/300" alt="菜品2">
                            <img src="https://picsum.photos/seed/food3/300/300" alt="菜品3">
                            <img src="https://picsum.photos/seed/food4/300/300" alt="菜品4">
                        </div>
                    </div>
                    
                    <div class="树洞-actions">
                        <button class="action-btn">
                            <i class="far fa-heart"></i>
                            <span>189</span>
                        </button>
                        <button class="action-btn">
                            <i class="far fa-comment"></i>
                            <span>45</span>
                        </button>
                        <button class="action-btn saved">
                            <i class="fas fa-bookmark"></i>
                            <span>收藏</span>
                        </button>
                        <button class="action-btn">
                            <i class="far fa-share-alt"></i>
                            <span>分享</span>
                        </button>
                    </div>
                </div>
            </div>
            
            <!-- 无图树洞 -->
            <div class="card no-image-树洞">
                <div class="树洞-content">
                    <div class="树洞-header">
                        <img src="https://picsum.photos/seed/user3/100/100" alt="用户头像" class="user-avatar">
                        <div class="user-info">
                            <div class="user-name">深夜独白</div>
                            <div class="post-time">昨天 00:15</div>
                        </div>
                    </div>
                    
                    <div class="树洞-text">
                        <p>不知道有没有人和我一样，凌晨三点突然醒来，然后就再也睡不着了。脑子里像放电影一样，各种回忆和担忧交织在一起。</p>
                        <p>有时候真的很想找个人聊聊，但翻遍通讯录，却不知道该打给谁。成年人的孤独，大概就是这样吧。</p>
                    </div>
                    
                    <div class="树洞-actions">
                        <button class="action-btn">
                            <i class="far fa-heart"></i>
                            <span>326</span>
                        </button>
                        <button class="action-btn">
                            <i class="far fa-comment"></i>
                            <span>89</span>
                        </button>
                        <button class="action-btn">
                            <i class="far fa-bookmark"></i>
                            <span>收藏</span>
                        </button>
                        <button class="action-btn">
                            <i class="far fa-share-alt"></i>
                            <span>分享</span>
                        </button>
                    </div>
                </div>
            </div>
            
            <!-- 单图树洞 -->
            <div class="card">
                <div class="树洞-content">
                    <div class="树洞-header">
                        <img src="https://picsum.photos/seed/user4/100/100" alt="用户头像" class="user-avatar">
                        <div class="user-info">
                            <div class="user-name">旅行者</div>
                            <div class="post-time">3天前</div>
                        </div>
                    </div>
                    
                    <div class="树洞-text">
                        <p>偶然发现的小众旅行地，没有太多游客，只有纯粹的自然风光。有时候，最美的风景往往在不经意间遇见。</p>
                    </div>
                    
                    <div class="image-container">
                        <img src="https://picsum.photos/seed/travel/600/400" alt="自然风光" class="single-image">
                    </div>
                    
                    <div class="树洞-actions">
                        <button class="action-btn">
                            <i class="far fa-heart"></i>
                            <span>412</span>
                        </button>
                        <button class="action-btn">
                            <i class="far fa-comment"></i>
                            <span>56</span>
                        </button>
                        <button class="action-btn">
                            <i class="far fa-bookmark"></i>
                            <span>收藏</span>
                        </button>
                        <button class="action-btn">
                            <i class="far fa-share-alt"></i>
                            <span>分享</span>
                        </button>
                    </div>
                </div>
            </div>
            
            <!-- 多图树洞 -->
            <div class="card">
                <div class="树洞-content">
                    <div class="树洞-header">
                        <img src="https://picsum.photos/seed/user5/100/100" alt="用户头像" class="user-avatar">
                        <div class="user-info">
                            <div class="user-name">铲屎官日常</div>
                            <div class="post-time">4天前</div>
                        </div>
                    </div>
                    
                    <div class="树洞-text">
                        <p>记录我家主子的日常，时而高冷，时而粘人，真是个磨人的小妖精。但有它在，家里总是充满欢乐。</p>
                    </div>
                    
                    <div class="image-container">
                        <div class="multi-image">
                            <img src="https://picsum.photos/seed/cat1/300/300" alt="猫咪1">
                            <img src="https://picsum.photos/seed/cat2/300/300" alt="猫咪2">
                            <img src="https://picsum.photos/seed/cat3/300/300" alt="猫咪3">
                        </div>
                    </div>
                    
                    <div class="树洞-actions">
                        <button class="action-btn liked">
                            <i class="fas fa-heart"></i>
                            <span>532</span>
                        </button>
                        <button class="action-btn">
                            <i class="far fa-comment"></i>
                            <span>78</span>
                        </button>
                        <button class="action-btn saved">
                            <i class="fas fa-bookmark"></i>
                            <span>收藏</span>
                        </button>
                        <button class="action-btn">
                            <i class="far fa-share-alt"></i>
                            <span>分享</span>
                        </button>
                    </div>
                </div>
            </div>
            
            <!-- 无图树洞 -->
            <div class="card no-image-树洞">
                <div class="树洞-content">
                    <div class="树洞-header">
                        <img src="https://picsum.photos/seed/user6/100/100" alt="用户头像" class="user-avatar">
                        <div class="user-info">
                            <div class="user-name">职场感悟</div>
                            <div class="post-time">5天前</div>
                        </div>
                    </div>
                    
                    <div class="树洞-text">
                        <p>工作五年，终于明白了一个道理：努力很重要，但选择比努力更重要。跟对人，做对事，有时候比埋头苦干更有效。</p>
                        <p>不要害怕改变，每一次转变都是一次成长的机会。</p>
                    </div>
                    
                    <div class="树洞-actions">
                        <button class="action-btn">
                            <i class="far fa-heart"></i>
                            <span>278</span>
                        </button>
                        <button class="action-btn">
                            <i class="far fa-comment"></i>
                            <span>63</span>
                        </button>
                        <button class="action-btn">
                            <i class="far fa-bookmark"></i>
                            <span>收藏</span>
                        </button>
                        <button class="action-btn">
                            <i class="far fa-share-alt"></i>
                            <span>分享</span>
                        </button>
                    </div>
                </div>
            </div>
        </div>
        
        <!-- 列表布局树洞 -->
        <div class="list-layout">
            <h2 class="section-title">
                <i class="fas fa-list"></i> 热门动态
            </h2>
            
            <!-- 列表项1 - 单图 -->
            <div class="card">
                <div class="image-container">
                    <img src="https://picsum.photos/seed/list1/400/400" alt="城市夜景" class="single-image">
                </div>
                
                <div class="树洞-content">
                    <div class="树洞-header">
                        <img src="https://picsum.photos/seed/user7/100/100" alt="用户头像" class="user-avatar">
                        <div class="user-info">
                            <div class="user-name">城市夜行者</div>
                            <div class="post-time">3天前</div>
                        </div>
                    </div>
                    
                    <div class="树洞-text">
                        <p>加班到深夜，走在空无一人的街道上，看着城市的灯火，突然觉得这个城市既熟悉又陌生。每个人都在为生活奔波，我们都是这座城市的过客。</p>
                    </div>
                    
                    <div class="树洞-actions">
                        <button class="action-btn liked">
                            <i class="fas fa-heart"></i>
                            <span>367</span>
                        </button>
                        <button class="action-btn">
                            <i class="far fa-comment"></i>
                            <span>42</span>
                        </button>
                        <button class="action-btn">
                            <i class="far fa-bookmark"></i>
                            <span>收藏</span>
                        </button>
                        <button class="action-btn">
                            <i class="far fa-share-alt"></i>
                            <span>分享</span>
                        </button>
                    </div>
                </div>
            </div>
            
            <!-- 列表项2 - 多图 -->
            <div class="card">
                <div class="image-container">
                    <div class="multi-image">
                        <img src="https://picsum.photos/seed/hobby1/300/300" alt="爱好1">
                        <img src="https://picsum.photos/seed/hobby2/300/300" alt="爱好2">
                        <img src="https://picsum.photos/seed/hobby3/300/300" alt="爱好3">
                    </div>
                </div>
                
                <div class="树洞-content">
                    <div class="树洞-header">
                        <img src="https://picsum.photos/seed/user8/100/100" alt="用户头像" class="user-avatar">
                        <div class="user-info">
                            <div class="user-name">手工达人</div>
                            <div class="post-time">1周前</div>
                        </div>
                    </div>
                    
                    <div class="树洞-text">
                        <p>最近迷上了手工制作，这些都是我这几周的成果。做手工的时候，能让我完全静下心来，忘记工作的烦恼，这种感觉真的很棒。</p>
                        <p>推荐大家都培养一个能让自己专注的爱好，很解压。</p>
                    </div>
                    
                    <div class="树洞-actions">
                        <button class="action-btn">
                            <i class="far fa-heart"></i>
                            <span>421</span>
                        </button>
                        <button class="action-btn">
                            <i class="far fa-comment"></i>
                            <span>93</span>
                        </button>
                        <button class="action-btn saved">
                            <i class="fas fa-bookmark"></i>
                            <span>收藏</span>
                        </button>
                        <button class="action-btn">
                            <i class="far fa-share-alt"></i>
                            <span>分享</span>
                        </button>
                    </div>
                </div>
            </div>
            
            <!-- 列表项3 - 无图 -->
            <div class="card no-image-树洞">
                <div class="树洞-content">
                    <div class="树洞-header">
                        <img src="https://picsum.photos/seed/user9/100/100" alt="用户头像" class="user-avatar">
                        <div class="user-info">
                            <div class="user-name">读书感悟</div>
                            <div class="post-time">1周前</div>
                        </div>
                    </div>
                    
                    <div class="树洞-text">
                        <p>读完《人类简史》的一些感悟：人类的发展真的很奇妙，我们从一个普通的动物，变成了地球的主宰。但同时，我们也面临着前所未有的挑战。</p>
                        <p>推荐大家都读一读这本书，会让你对人类历史有不一样的认识。</p>
                    </div>
                    
                    <div class="树洞-actions">
                        <button class="action-btn">
                            <i class="far fa-heart"></i>
                            <span>289</span>
                        </button>
                        <button class="action-btn">
                            <i class="far fa-comment"></i>
                            <span>76</span>
                        </button>
                        <button class="action-btn">
                            <i class="far fa-bookmark"></i>
                            <span>收藏</span>
                        </button>
                        <button class="action-btn">
                            <i class="far fa-share-alt"></i>
                            <span>分享</span>
                        </button>
                    </div>
                </div>
            </div>
        </div>
        
        <!-- 加载更多 -->
        <div class="text-center mt-4">
            <button class="btn btn-outline" style="padding: 0.6rem 2rem; border-color: var(--primary); color: var(--primary);">
                <i class="fas fa-sync-alt"></i> 加载更多树洞
            </button>
        </div>
    </div>

    <!-- Bootstrap 5 JS Bundle with Popper -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
    
    <script>
        document.addEventListener('DOMContentLoaded', function() {
            // 视图切换功能
            const viewTabs = document.querySelectorAll('.view-tab');
            
            viewTabs.forEach(tab => {
                tab.addEventListener('click', function() {
                    // 移除所有标签的active类
                    viewTabs.forEach(t => t.classList.remove('active'));
                    // 为当前点击的标签添加active类
                    this.classList.add('active');
                    
                    // 在实际应用中，这里会根据选择的视图类型加载不同的内容
                    const viewType = this.getAttribute('data-view');
                    console.log('切换到', viewType, '视图');
                });
            });
            
            // 点赞功能
            const likeButtons = document.querySelectorAll('.action-btn:has(.far.fa-heart), .action-btn:has(.fas.fa-heart)');
            
            likeButtons.forEach(button => {
                button.addEventListener('click', function() {
                    const icon = this.querySelector('i');
                    let countText = this.querySelector('span').textContent;
                    let count = parseInt(countText) || 0;
                    
                    if (icon.classList.contains('far')) {
                        // 变为已点赞状态
                        icon.classList.remove('far');
                        icon.classList.add('fas');
                        this.classList.add('liked');
                        // 更新点赞数
                        this.querySelector('span').textContent = count + 1;
                    } else {
                        // 变为未点赞状态
                        icon.classList.remove('fas');
                        icon.classList.add('far');
                        this.classList.remove('liked');
                        // 更新点赞数
                        this.querySelector('span').textContent = count - 1;
                    }
                });
            });
            
            // 收藏功能
            const saveButtons = document.querySelectorAll('.action-btn:has(.far.fa-bookmark), .action-btn:has(.fas.fa-bookmark)');
            
            saveButtons.forEach(button => {
                button.addEventListener('click', function() {
                    const icon = this.querySelector('i');
                    
                    if (icon.classList.contains('far')) {
                        // 变为已收藏状态
                        icon.classList.remove('far');
                        icon.classList.add('fas');
                        this.classList.add('saved');
                        alert('已收藏该树洞');
                    } else {
                        // 变为未收藏状态
                        icon.classList.remove('fas');
                        icon.classList.add('far');
                        this.classList.remove('saved');
                        alert('已取消收藏');
                    }
                });
            });
            
            // 评论按钮点击事件
            const commentButtons = document.querySelectorAll('.action-btn:has(.far.fa-comment)');
            
            commentButtons.forEach(button => {
                button.addEventListener('click', function() {
                    // 在实际应用中，这里会跳转到评论区或打开评论弹窗
                    const userName = this.closest('.树洞-content').querySelector('.user-name').textContent;
                    alert(`查看 ${userName} 的树洞评论`);
                });
            });
            
            // 分享按钮点击事件
            const shareButtons = document.querySelectorAll('.action-btn:has(.far.fa-share-alt)');
            
            shareButtons.forEach(button => {
                button.addEventListener('click', function() {
                    // 在实际应用中，这里会打开分享选项
                    alert('分享功能：选择分享方式');
                });
            });
            
            // 加载更多按钮点击事件
            document.querySelector('.btn-outline').addEventListener('click', function() {
                const btn = this;
                const originalText = btn.innerHTML;
                
                // 显示加载状态
                btn.innerHTML = '<i class="fas fa-spinner fa-spin"></i> 加载中...';
                btn.disabled = true;
                
                // 模拟加载延迟
                setTimeout(() => {
                    btn.innerHTML = originalText;
                    btn.disabled = false;
                    alert('已加载最新树洞内容');
                }, 1500);
            });
        });
    </script>
</body>
</html>
    
